package controller.KeyListeners;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.util.HashMap;

import javax.swing.KeyStroke;

import view.mainscreen.AreaViewport;

public class CursorKeyListener  extends KeyboardListener{
	AreaViewport areaViewport;
	public CursorKeyListener(){
		keyBindings.put(KeyStroke.getKeyStroke(97,0), new Action(){
			//TODO
			//Code for SW input for cursor movement
			public void perform() {
				areaViewport.moveCursorSouthWest();
			}
		});
		keyBindings.put(KeyStroke.getKeyStroke(98,0), new Action(){
			//TODO
			//Code for S input for cursor movement
			public void perform() {
				areaViewport.moveCursorSouth();
			}
		});
		keyBindings.put(KeyStroke.getKeyStroke(99,0), new Action(){
			//TODO
			//Code for SE input for cursor movement
			public void perform() {
				areaViewport.moveCursorSouthEast();
			}
		});
		keyBindings.put(KeyStroke.getKeyStroke(101,0), new Action(){
			//TODO
			//Code for Focus input for cursor movement
			public void perform() {
				areaViewport.moveToFocus();
			}
		});
		keyBindings.put(KeyStroke.getKeyStroke(103,0), new Action(){
			//TODO
			//Code for NW input for cursor movement
			public void perform() {
				areaViewport.moveCursorNorthWest();
			}
		});
		keyBindings.put(KeyStroke.getKeyStroke(104,0), new Action(){
			//TODO
			//Code for N input for cursor movement
			public void perform() {
				areaViewport.moveCursorNorth();
			}
		});
		keyBindings.put(KeyStroke.getKeyStroke(105,0), new Action(){
			//TODO
			//Code for NE input for directional command
			public void perform() {
				areaViewport.moveCursorNorthEast();
			}
		});
	}
	public void attachAreaViewport(AreaViewport _areaViewport){
		areaViewport = _areaViewport;
	}
}
